<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        let arr = [["东城区", "西城区","朝阳区","海淀区","丰台区"],
            ["黄浦区", "静安区", "浦东新区", "闵行区","崇明区"],
            ["南京市", "苏州市", "南通市", "常州市","无锡市"],
            ["杭州市", "宁波市", "温州市", "金华市","台州市"],
            ["广州市", "深圳市", "珠海市", "汕头市","佛山市"]]

        function f01(element) {
            let citys = arr[element.value];

            let citySel = document.getElementById("citySel");

            citySel.innerHTML = "<option value=\"\">-----请选择城市-----</option>"

            for (let i = 0; i < citys.length; i++) {
                citySel.innerHTML+= "<option value=\""+i+"\">"+citys[i]+"</option>"
            }
        }

    </script>
</head>
<body>
<h1>请选择省份</h1>
<select name="province" id="provinceSel" onchange="f01(this)">
    <option value="">-----请选择省份-----</option>
    <option value="0">北京</option>
    <option value="1">上海</option>
    <option value="2">江苏省</option>
    <option value="3">浙江省</option>
    <option value="4">广东省</option>
</select>
<h1>请选择城市</h1>
<select name="city" id="citySel">
    <option value="">-----请选择城市-----</option>
</select>
</body>
</html>